package com.woniuxy.yoga.business.service;

import com.woniuxy.yoga.business.dao.model.BusinessAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.yoga.business.model.dto.businessaccount.BusinessAccountLoginDTO;
import com.woniuxy.yoga.business.model.dto.businessaccount.BusinessAccountSelDTO;
import com.woniuxy.yoga.business.model.dto.businessaccount.BusinessLoginPhoneDTO;
import com.woniuxy.yoga.business.model.param.businessaccount.*;
import com.woniuxy.yoga.commons.core.model.PageInfo;

import java.net.UnknownHostException;

/**
 * <p>
 * 商家账号表 服务类
 * </p>
 *
 * @author 韦用文,刘存益,郎腾霄
 * @since 2023年11月30日
 */
public interface BusinessAccountService extends IService<BusinessAccount> {
    /**
     * 商家发送注册验证码
     *
     * @param param 发送验证码参数对象
     * @return
     */
    void sendRegisterCode(BusinessRegisterPhoneParam param) throws Exception;
    /**
     * 商家手机验证码注册操作
     *
     * @param param
     * @return
     */
    Integer businessRegister(BusinessRegisterParam param) throws Exception;
    /**
     * 商家账号登录
     *
     * @param param
     * @return
     */
    BusinessAccountLoginDTO businessLoginByName(BusinessAccountLoginParam param) throws UnknownHostException;
    /**
     * 商家发送登录验证码
     *
     * @param param
     * @return
     */
    void sendLoginCode(BusinessLoginSendParam param) throws Exception;
    /**
     * 商家手机验证码登录
     *
     * @param param
     * @return
     */
    BusinessLoginPhoneDTO businessLoginByPhone(BusinessLoginPhoneParam param) throws UnknownHostException;
    /**
     * 商家修改账号头像
     * @param param
     * @return
     */
    void updateHeader(UpdateHeaderParam param) throws Exception;
    /**
     * 商家修改账号密码
     * @param param
     * @return
     */
    void changePassword(ChangePasswordParam param);
    /**
     * 检查商家输入的密码是否正确
     * @param param
     * @return
     */
    void checkPassword(CheckPasswordParam param);
    /**
     * 修改商家昵称
     * @param param
     * @return
     */
    void changeNickName(ChangeNickNameParam param);
    /**
     * 查询商家信息
     * @param businessId
     * @return
     */
    BusinessAccountSelDTO selBusiness(Integer businessId);
    /**
     * 商家注销操作
     * @param businessId
     * @return
     * @throws Exception
     */
    void businessDelete(Integer businessId);

    /**
     * 平台分页查询商家信息
     * @return
     */
    PageInfo selectPageBusiness(SelectPageBusinessParam param);
}
